import request from "../utils/request.js";

// 登录
export const login = (data) => request("/login", "POST", data);
// 注册
export const register = (data) => request("/register", "POST", data);
// 列表
export const list = (data, table) =>
  request(`/system/${table}/list`, "get", data);
// 详情
export const detail = (id, table) => request(`/system/${table}/${id}`, "get");
// 修改
export const edit = (data, table) => request(`/system/${table}`, "put", data);
// 增加
export const add = (data, table) => request(`/system/${table}`, "post", data);
// 删除
export const del = (id, table) => request(`/system/${table}/${id}`, "delete");
// 获取个人信息
export const getInfo = () => request("/system/user/profile", "get");
 